package com.chenyue.cm.user.service.impl;


import java.io.Serializable;
import java.util.List;

import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chenyue.cm.base.service.BaseServiceImpl;
import com.chenyue.cm.base.dao.LcBaseMapper;
import com.chenyue.cm.user.domain.JdAttrValueExample;
import org.springframework.beans.factory.annotation.Qualifier;
import com.chenyue.cm.user.dao.JdAttrValueMapper;
import com.chenyue.cm.user.domain.JdAttrValue;
import com.chenyue.cm.user.service.JdAttrValueService;
import org.springframework.stereotype.Service;


/**
*
* @author chenyue-cm
*/
@Service(value = "JdAttrValueService")
public class JdAttrValueServiceImpl extends BaseServiceImpl<JdAttrValue>  implements JdAttrValueService {

private final JdAttrValueMapper jdAttrValueMapper;

	public JdAttrValueServiceImpl(@Qualifier("jdAttrValueMapper") JdAttrValueMapper jdAttrValueMapper) {
		this.jdAttrValueMapper = jdAttrValueMapper;
	}

	@Override
	@Resource(name = "jdAttrValueMapper")
	public void setBaseMapper(LcBaseMapper<JdAttrValue, Serializable> baseMapper) {
		this.baseMapper = baseMapper;
	}

	@Override
	public List<JdAttrValue> getMAttrValueByKeyIds(List<String> keyIds) {
		JdAttrValueExample aExample = new JdAttrValueExample();
		aExample.createCriteria().andKeyIdIn(keyIds);
		List<JdAttrValue> attrValues = jdAttrValueMapper.selectByExample(aExample);
		return attrValues;
	}

	@Override
	public List<JdAttrValue> getAttrValueList(String keyId) {
		JdAttrValueExample aExample = new JdAttrValueExample();
		aExample.createCriteria().andKeyIdEqualTo(keyId);
		List<JdAttrValue> attrValues = jdAttrValueMapper.selectByExample(aExample);
		return attrValues;
	}
}
